<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Canonicalize nodes to a file</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="domnode.c14n.html">« DOMNode::C14N</a></li>
      <li style="float: right;"><a href="domnode.clonenode.html">DOMNode::cloneNode »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.domnode.html">DOMNode</a></li>
    <li>Canonicalize nodes to a file</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="domnode.c14nfile" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DOMNode::C14NFile</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">DOMNode::C14NFile</span> &mdash; <span class="dc-title">Canonicalize nodes to a file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-domnode.c14nfile-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>DOMNode::C14NFile</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$exclusive</code><span class="initializer"> = <strong><code>false</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">bool</span> <code class="parameter">$withComments</code><span class="initializer"> = <strong><code>false</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$xpath</code><span class="initializer"> = <strong><code>null</code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$nsPrefixes</code><span class="initializer"> = <strong><code>null</code></strong></span></span><br>): <span class="type"><span class="type">int</span>|<span class="type"><span class="type false">false</span></span></span></div>

  <p class="para rdfs-comment">
   Canonicalize nodes to a file.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-domnode.c14nfile-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">uri</code></dt>

    <dd>

     <p class="para">
      Path to write the output to.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">exclusive</code></dt>

    <dd>

     <p class="para">
      Enable exclusive parsing of only the nodes matched by the provided
      xpath or namespace prefixes.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">withComments</code></dt>

    <dd>

     <p class="para">
      Retain comments in output.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">xpath</code></dt>

    <dd>

     <p class="para">
      An array of <code class="literal">xpath</code>s to filter the nodes by.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">nsPrefixes</code></dt>

    <dd>

     <p class="para">
      An array of namespace prefixes to filter the nodes by.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-domnode.c14nfile-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Number of bytes written 或者在失败时返回 <strong><code>false</code></strong>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-domnode.c14nfile-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="domnode.c14n.html" class="methodname" rel="rdfs-seeAlso">DOMNode::C14N()</a> - Canonicalize nodes to a string</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>